<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    class Person {
        constructor(name, age) {
            this.name = name;
            this.age = age;
        }
        say() {
            console.log('hello');
        }
    }

    class Student extends Person {
        constructor(name, age, grade) {
            super(name, age)
            this.grade = grade;
        }
        study() {
            console.log('study');
        }
    }

    const zhangsan = new Student('张三', 18, 1)
    console.log(zhangsan);


</script>

</html>